//
//  MYXHttpManager.h
//  meiyinxiang
//
//  Created by 陈李飞 on 2017/11/21.
//  Copyright © 2017年 hbjApple. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <JSONModel/JSONModel.h>
#import "userinfoModel.h"
#import "MYXMemberMdel.h"
#import "MYXAuthenticationModel.h"
#import "MYXbossModel.h"
#import "MYXotheruserinfoModel.h"


typedef void (^StateBlock) (BOOL sucess, NSString *msg);
typedef void (^ModelBlock) (BOOL success, NSString *msg, id object);
typedef void (^ModelArrayBlock) (BOOL success,NSString *msg, NSArray *ListArray);

@interface MYXHttpManager : NSObject
+ (MYXHttpManager *)shared;

/**< 登录 */
- (void)login:(NSString *)account
         code:(NSString *)code
   Invitation:(NSString *)Invitation
     password:(NSString *)password
          sex:(NSString *)sex
      success:(void(^)(MYY_User *user))success
      failure:(void(^)(NSString *  errorCode))failure
      netDown:(void(^)())netDown;
/* 注册接口*/
- (void)registeraccount:(NSString *)account
                   code:(NSString *)code
             Invitation:(NSString *)Invitation
               password:(NSString *)password
                    sex:(NSString *)sex
                success:(void(^)(MYY_User *user))success
                failure:(void(^)(NSString *  errorCode))failure
                netDown:(void(^)())netDown;

/**< 获取短信 */
- (void)identify:(NSString *)iphone_ID success:(void(^)(NSString *dataStr))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;


/**< 个人信息 */
- (void)userinfo:(void(^)(MYXMemberMdel *user))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;

/**< 关注列表 */
- (void)myfollowList:(void(^)(NSArray *followListArray))success
             failure:(void(^)(NSString *  errorCode))failure
             netDown:(void(^)())netDown
                page:(NSString *)page
                size:(NSString *)size;

/**< im注册 */
- (void)imreg:(void(^)(NSString  *mes))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;
/**< 粉丝列表 */
- (void)myfansList:(void(^)(NSArray *myfansListArray))success
           failure:(void(^)(NSString *  errorCode))failure
           netDown:(void(^)())netDown
              page:(NSString *)page
              size:(NSString *)size;

/**< 修改资料 */
- (void)useredit:(NSString *)image username:(NSString *)username nickname:(NSString *)nickname sex:(NSString *)sex tags:(NSString *)tags tags2:(NSString *)tags2 age:(NSString *)age home:(NSString *)home birthday:(NSString *)birthday signature:(NSString *)signature success:(void(^)(NSString *dataStr))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;

/**< 实名认证 */
- (void)idauth:(NSString *)real_name code:(NSString *)code image_front:(NSString *)image_front image_back:(NSString *)image_back  success:(void(^)(NSString *dataStr ,MYXAuthenticationModel *MYXAuthenticationMo))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;


/**< 加关注  addfollow */
- (void)addfollow:(NSString *)addfollow_ID success:(void(^)(NSString *dataStr))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;
/**< 取消关注 */
- (void)cancelfollow:(NSString *)follow_ID success:(void(^)(NSString *dataStr))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;


/**< 我是boss */
- (void)boss:(void(^)(MYXbossModel *MYXbossMod))success
     failure:(void(^)(NSString *  errorCode))failure
     netDown:(void(^)())netDown
        page:(NSString *)page
        size:(NSString *)size;

/**
 添加boss手机号

 @param bossPhone boss的手机号码
 @param result 返回结果
 */
- (void)addMyBossWithPhone:(NSString *)bossPhone
                withResult:(StateBlock)result;
/**< 收益列表 */
- (void)PageIndex:(int)PageIndex usefrozenmoneyList:(void(^)(NSArray *usefrozenmoneyListArray))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;


/**< 领取收益 */
- (void)success:(void(^)(NSString *dataStr))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;
/**< 随机标签 */
- (void)randtags:(void(^)(NSArray *randtagsListArray))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;

/**< 忘记密码 */
- (void)phone:(NSString *)phone code:(NSString *)code password:(NSString *)password success:(void(^)(MYY_User *user))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;
/**<是否开启联系人 */
- (void)ismatch:(NSString *)is_match success:(void(^)(NSString *dataStr))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;

/**<匹配通讯录 */
- (void)findmatch:(NSString *)phones success:(void(^)(NSArray *findmatchListArray))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;

/**< 设置支付密码 */
- (void)setpaypwd:(NSString *)phone code:(NSString *)code paypassword:(NSString *)paypassword success:(void(^)(NSString *dataStr))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;

/**<黑名单列表 */


- (void)myblacklist:(int)PageIndex success:(void(^)(NSArray *blacklistArray))success failure:(void(^)(NSString *  errorCode))failure netDown:(void(^)())netDown;
/**
 发红包
 
 @param lat 纬度
 @param lon 经度
 @param title 红包标题
 @param content 红包内容
 @param file 红包附件
 @param is_normal 是否是普通红包
 @param sex 性别区分
 @param rcount 红包个数
 @param money 金额
 @param radius 半径
 @param paypassword 支付密码
 @param result 返回结果
 @param errorResult 错误返回
 */
- (void)postLuckyMoneyWithlatitude:(NSString *)lat
                         longitude:(NSString *)lon
                             title:(NSString *)title
                           content:(NSString *)content
                              file:(NSString *)file
                         is_normal:(NSString *)is_normal
                               sex:(NSString *)sex
                            rcount:(NSString *)rcount
                             money:(NSString *)money
                            radius:(NSString *)radius
                       paypassword:(NSString *)paypassword
                         ticket_id:(NSString *)ticket_id
                        withResult:(StateBlock)result
                       errorResult:(ErrorBlock)errorResult;


/**
 资料卡

 @param userID 用户id
 @param result 返回结果
 @param errorResult 错误返回
 */
-(void)otheruserinfo:(NSString *)userID
          withResult:(ModelBlock)result
         errorResult:(ErrorBlock)errorResult;

/**
 资料卡列表
 
 @param userID 用户id
 @param result 返回结果
 @param errorResult 错误返回
 */
-(void)otheruserinfoList:(NSString *)userID
          withResult:(ModelBlock)result
         errorResult:(ErrorBlock)errorResult;


/**
 我的发布

 @param PageIndex 多少页
 @param result 返回结果
 @param errorResult 返回错误
 */
- (void)mypublish:(int)PageIndex
           withResult:(ArrayBlock)result
      errorResult:(ErrorBlock)errorResult;


/**
 钱来钱往
 
 @param PageIndex 多少页
 @param result 返回结果
 @param errorResult 返回错误
 */
- (void)mymoneylog:(int)PageIndex
       withResult:(ArrayBlock)result
      errorResult:(ErrorBlock)errorResult;

/**
 我的钱包

 @param result 返回结果
 @param errorResult 返回错误
 */
-(void)mymoney:(ModelBlock)result
         errorResult:(ErrorBlock)errorResult;

/**
 获取热榜

 @param result 返回结果
 @param errorResult 错误结果
 */
- (void)getTopHotestListWithResult:(ArrayBlock)result
                       errorResult:(ErrorBlock)errorResult;

/**
 请求红包券列表

 @param result  返回结果
 @param errorResult 错误结果
 */
- (void)getVochersListWithResult:(ArrayBlock)result
                     errorResult:(ErrorBlock)errorResult;

/**
 充值支付接口

 @param payType 支付方式·
 @param money 支付金额
 @param result 结果
 @param errorResult 错误结果
 */
- (void)rechargeWithPayType:(NSString *)payType
                      money:(NSString *)money
                       result:(StateBlock)result
                errorResult:(ErrorBlock)errorResult;
/**
 获取投票列表

 @param page 页数
 @param size 每页个数
 @param result 返回结果
 @param errorResult 错误结果
 */
- (void)getVoteListWithPage:(NSString *)page
                       size:(NSString *)size
                     Result:(ArrayBlock)result errorResult:(ErrorBlock)errorResult;

/**
 投票

 @param result 投票结果
 */
- (void)voteWithVoteId:(NSString *)voteId
               Result:(StateBlock)result
            errorResult:(ErrorBlock)errorResult;

/**
 报名参加接口

 @param para 报名请求资料
 @param result 结果
 @param errorResult 错误结果
 */
- (void)applyActivityWithPara:(NSDictionary *)para
                       Result:(StateBlock)result
                  errorResult:(ErrorBlock)errorResult;

/**
 投票报名搜索接口

 @param keyword 关键字
 @param result 返回结果
 @param errorResult 错误结果
 */
- (void)applyActivitySearchWithKeyWord:(NSString *)keyword
                            withResult:(ArrayBlock)result
                           errorResult:(ErrorBlock)errorResult;

/**
 提现接口

 @param moneyCount 提现金额
 @param payname 提现到账平台
 @param payid 账号
 @param paypassword 支付密码
 @param result 返回结果
 */
- (void)cashMoneyWithMoneyCount:(NSString *)moneyCount
                        payname:(NSString *)payname
                          payid:(NSString *)payid
                    paypassword:(NSString *)paypassword
                     withResult:(StateBlock)result;
///firstticket

/**
 获取第一次红包体验券

 @param result 返回结果
 */
- (void)getFirstTimeTicketWithResult:(StateBlock)result;

/**
 领取减免红包券

 @param result 返回结果
 */
- (void)getMYXHomepageVochersWithlat:(NSString *)lat
                                 lon:(NSString *)lon
                                 pid:(NSString *)pid
                              Result:(StateBlock)result;

/**
 发送红包券

 @param lat 京都市
 @param lon 纬度
 @param count 数量
 @param money 减免金额
 @param result 返回结果
 */
- (void)postVocherWithLat:(NSString *)lat
                      lon:(NSString *)lon
                    count:(NSString *)count
                    money:(NSString *)money
               withResult:(StateBlock)result;

/**
 反馈接口

 @param content 反馈内容
 @param result 反馈接口返回结果
 */
- (void)postQuestionWithContent:(NSString *)content
                     withResult:(StateBlock)result;

/**
 查看当前版本

 @param result 返回当前版本
 */
- (void)checkVersionWithResult:(StateBlock)result;

/**
 点击进入回复详情

 @param redPocketId 红包的id
 @param recommendManId 评论人的id
 @param commendListResult 评论列表
 */
- (void)clickToCommendListWithPage:(NSString *)page
                              size:(NSString *)size
                       RedPacketId:(NSString *)redPocketId
                    recommendManId:(NSString *)recommendManId
                            result:(ArrayBlock)commendListResult;

/**
 回复多条评论

 @param luckyMoneyId 大红包id
 @param content 评论内容
 @param to_user_id 评论人id
 @param rp_user_id  发红包人id
 @param result 返回结果
 */
- (void)leaveMoreContentWithLuckyMoneyId:(NSString *)luckyMoneyId
                                 content:(NSString *)content
                              to_user_id:(NSString *)to_user_id
                               rp_user_id:(NSString *)rp_user_id
                                  result:(StateBlock)result;

/**
 获取多条通知

 @param result 多条通知
 */
- (void)getNoticesWitResult:(ArrayBlock)result ;

@end
